#include"chess.h"
class Player :public Chess 
{
public: 
  Player()
  {
    who = 1;
    player1 = '#';
    player2 = '*';

  }
  bool push_pieces()
  {
    int i,j;
    cout << "round " << who << ":" << "Input row col" << endl;
    cin >> i >> j;
    while((i >> _row || i-1 < 0 || j > _col || j < 0) || arr[i-1][j-1] != ' ')
    {
      cout << "false push" << endl;
      cout << "again chose" << endl;
      cin >> i >> j;
    }
    if(who%2)
    {
      arr[i-1][j-1] = player1;
      if(IsWin(player1,i-1,j-1))
      {
        cout << "player1 win" << endl;
        return true;
      }
      PrintChess();
    }
    else{ 
      arr[i-1][j-1] = player2;
      if(IsWin(player2,i-1,j-1))
      {
        cout << "player2 win" << endl;
        return true;
      }
      PrintChess();
    }
    who++;
    return false;
  }
private:
  int who;
  char player1;
  char player2;
};
